package com.situ.stl.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ToString
@NoArgsConstructor
@TableName("reserve")
public class Reserve {
    @TableId(type = IdType.AUTO)
    private Integer id;

    //状态（0未签到、1已签到、2已完成、3已取消）
    private Integer status;

    private Double score;
    private String comment;
    //评论时间
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
    private Date commentTime;

    //预约时间
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reserveTime;

    private Integer courseId;
    private Integer memberId;


    @TableField(exist = false)
    private Course course;

    @TableField(exist = false)
    private Member member;

    // 新增关联名称字段
    @TableField(exist = false)
    private String memberName;
    @TableField(exist = false)
    private String courseName;
    @TableField(exist = false)
    private String coachName;


}
